import request from '@/utils/request'

// 创建农业社会化服务
export function createEmploy(data) {
  return request({
    url: '/farmer/employ/create',
    method: 'post',
    data: data
  })
}

// 更新农业社会化服务
export function updateEmploy(data) {
  return request({
    url: '/farmer/employ/update',
    method: 'put',
    data: data
  })
}

// 删除农业社会化服务
export function deleteEmploy(id) {
  return request({
    url: '/farmer/employ/delete?id=' + id,
    method: 'delete'
  })
}

// 获得农业社会化服务
export function getEmploy(id) {
  return request({
    url: '/farmer/employ/get?id=' + id,
    method: 'get'
  })
}

// 获得农业社会化服务分页
export function getEmployPage(query) {
  return request({
    url: '/farmer/employ/page',
    method: 'get',
    params: query
  })
}

// 导出农业社会化服务 Excel
export function exportEmployExcel(query) {
  return request({
    url: '/farmer/employ/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
